package com.user.controller;

import com.user.model.R;
import com.user.model.User;
import com.user.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    //新增挂号信息
    @PostMapping("/save")
    public R save(@RequestBody User user){
        userService.save(user);
        return R.ok("新增成功");
    }
}
